<div id="md5" class="container" style="width:800px;">

  <ul class="list-group" style="margin-top:70px;">

    <b class="list-group-item title">
      应用选择
    </b>
    <li class="list-group-item form-horizontal" style="padding: 15px 15px 0;">
      <div class="form-group">
        <div class="col-md-2" ng-repeat="(key,app) in allApp">
          <div class="checkbox" style="padding:0">
            <label>
              <input type="radio" name="app" ng-value="key" ng-model="nowAppKey" ng-click="radio(key)"> {{apps[key]}}
            </label>
          </div>
        </div>
      </div>
    </li>

    <b class="list-group-item title">
      用户
    </b>
    <div class="list-group-item">
      <div class="row">

        <div ng-repeat="db in nowApp" class="form-group col-md-4" style="margin-top: 8px;">
          <div>
            <b ng-bind="db.username"></b>
          </div>
          <div class="input-group" style="margin-top: 8px;">
            <span class="input-group-addon">用户名</span>
            <input ng-model="db.username" type="text" class="form-control" placeholder="用户名" readonly tabindex="-1">
          </div>
          <div class="input-group" ng-class="db.isNull?'has-error':''" style="margin-top: 8px;">
            <span class="input-group-addon">密　码</span>
            <input ng-model="db.password" ng-change="checkPWD(db)" type="{{!db.canLook?'text':'password'}}" class="form-control" placeholder="密码">
            <span class="input-group-btn" ng-init="db.canLook=false" ng-click="db.canLook=!db.canLook">
              <button style="border-radius: 0!important;padding: 6px;" class="btn btn-default" type="button">
                <i class="fa" ng-class="!db.canLook?'fa-eye':'fa-eye-slash'" ng-style="{color:!db.canLook?'#444':'#aaa'}"></i>
              </button>
            </span>
          </div>
        </div>

      </div>
    </div>

    <div class="list-group-item" style="text-align:right">
      <a href="javascript:void(0)" class="btn btn-primary" ng-click="loading?'':compileDialog(nowApp)">{{loading?'计算中，请稍等...':'开始计算'}}</a>
    </div>

  </ul>

</div>

<!--上/下一步-->
<a onClick="javascript:history.back(-1);" class="step-btn left" data-toggle="tooltip" data-placement="right" title="返回">
  <i class="iconfont icon-back"></i>
</a>

<!--查看编译失效对象Dialog-->
<div class="modal bs-example-modal-lg fade" id="md5-dialog" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-lg" style="width:1080px;" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">共{{compileItemsTotal}}条记录</h4>
      </div>
      <div class="modal-body">
        <!--数据-->
        <div style="min-height: 410px;">
          <table class="table table-striped table-bordered" style="margin-bottom: 0">
            <thead>
              <tr>
                <th>md5</th>
                <th>realMd5</th>
                <th>owner</th>
                <th>objectName</th>
                <th>objectType</th>
                <th>内容</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="i in pageItemNumArr" style="font-size:12px;">
                <td style="padding:4px 8px;">{{compileItems[(nowPage-1)*pageItemNum+i].md5}}</td>
                <td style="padding:4px 8px;">{{compileItems[(nowPage-1)*pageItemNum+i].realMd5}}</td>
                <td style="padding:4px 8px;">{{compileItems[(nowPage-1)*pageItemNum+i].owner}}</td>
                <td style="padding:4px 8px;">{{compileItems[(nowPage-1)*pageItemNum+i].objectName}}</td>
                <td style="padding:4px 8px;">{{compileItems[(nowPage-1)*pageItemNum+i].objectType}}</td>
                <td style="padding:4px 8px;width:150px;max-width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
                  <a style="cursor:pointer" data-toggle="modal" data-target="#md5-content" ng-click="fullContent(compileItems[(nowPage-1)*pageItemNum+i].content)">
                    {{compileItems[(nowPage-1)*pageItemNum+i].content}}</a>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <!--分页-->
        <nav aria-label="Page navigation" style="text-align: center">
          <ul class="pagination" style="margin: 15px 0 0">
            <!--第一页-->
            <li ng-class="nowPage==1?'disabled':''">
              <a href="javascript:void(0)" ng-click="changePage(1)" aria-label="Previous">
                <span aria-hidden="true">&lt;&lt;</span>
              </a>
            </li>
            <!--上一页-->
            <li ng-class="nowPage==1?'disabled':''">
              <a href="javascript:void(0)" ng-click="changePage(nowPage-1)" aria-label="Previous">
                <span aria-hidden="true">&lt;</span>
              </a>
            </li>
            <!--页码-->
            <li ng-repeat="p in pages" ng-class="nowPage==p?'active':''">
              <a style="min-width:34px;text-align:center;padding:6px 4px;" href="javascript:void(0)" ng-if="nowPage==p">{{p}}</a>
              <a style="min-width:34px;text-align:center;padding:6px 4px;cursor:pointer" ng-if="nowPage!=p" ng-click="changePage(p)" ng-hide="p<nowPage-calPage1||p>nowPage+calPage2">{{p}}</a>
            </li>
            <!--下一页-->
            <li ng-class="nowPage==pages.length?'disabled':''">
              <a href="javascript:void(0)" ng-click="changePage(nowPage+1)" aria-label="Next">
                <span aria-hidden="true">&gt;</span>
              </a>
            </li>
            <!--最后一页-->
            <li ng-class="nowPage==pages.length?'disabled':''">
              <a href="javascript:void(0)" ng-click="changePage(pages.length)" aria-label="Next">
                <span aria-hidden="true">&gt;&gt;</span>
              </a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</div>

<!-- 详细内容 -->
<div class="modal fade bs-example-modal-lg " id="md5-content" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog modal-lg " role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="myModalLabel">完整内容</h4>
      </div>
      <div class="modal-body" style="word-break:break-word;word-wrap:break-word">
        {{content}}
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>